package cn.cdl.report.util;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

/***
 * 文件处理工具类
 * @author chendongliang
 *
 */
public class FileUtil {

	/***
	 * 文件上传
	 * @param file
	 * @param path
	 * @param fileName
	 * @throws IOException 
	 */
	public static void uploadFile(byte[] file ,String filePath ,String fileName) throws IOException{
		File targetFile = new File(filePath);
		if(!targetFile.exists()){
			targetFile.mkdir();
		}
		FileOutputStream os = new FileOutputStream(filePath+fileName);
		os.write(file);
		os.flush();
		os.close();
	}
	
	/***
	 * 删除文件
	 * @param fileName
	 */
	public static void deleteFile(String fileName){
		
		
		
	}
}
